import axios from "axios";

axios.defaults.withCredentials = true
const instance =  axios.create({
    baseURL:'http://localhost:3000',
    timeout:5000
})


// 请求拦截

instance.interceptors.request.use(config =>{
    return config
})


// 响应拦截

instance.interceptors.response.use(res =>{
    return res
}, error=>{
    // const status = error.response.status
    // switch(status){
    //     case '503':
            
    // }
    return error.response
})

export default instance